class Cat():

    def __init__(self, new_name):
        self.name = new_name

    def eat(self):
        print("%s 爱吃鱼" % self.name)

    def drink(self):
        print("%s 要喝水" % self.name)

    def __del__(self):
        print("%s 的生命周期结束！" % self.name)

    def __str__(self):
        return "姓名：%s" % self.name


# 创建猫对象
tom = Cat("Tom")
tom.eat()
tom.drink()
print(tom)

print("*" * 10)

# 再创建一个猫对象
lazy_cat = Cat("大懒猫")
lazy_cat.eat()
lazy_cat.drink()
print(lazy_cat)

print("*" * 10)